package array;

public class arraydemo01 {
    public static void main(String[] args) {
//        静态初始化数组
        //1.数据类型[] 数组名 = new 数据类型[]{元素1，元素2，元素3，.....}
        int[] ages = new int[]{22, 21, 33};
        double[] scores = new double[]{99.8, 74.5, 62};
        System.out.println(ages);     //[I@5cad8086  数组名存储的是元素地址
        System.out.println(scores);   //[D@6e0be858

        //2.简化写法 ：数据类型[] 数组名 ={元素1，元素2，元素3，.....}
        int[] ages2 ={22, 21, 33};
        double[] scores2 ={99.8, 74.5, 62};

        //3.数据类型 数组名[] ={元素1，元素2，元素3，.....}
        int ages3[] ={22, 21, 33};
        double scores3[] ={99.8, 74.5, 62};
    }
}
